
	
/****** Object:  Stored Procedure [dbo].tblImportTransactionInsert    Script Date: Thursday, October 27, 2011 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sptblImportTransactionInsert]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sptblImportTransactionInsert]
GO

	
	

/******************************************************************************
**		File: 
**		Name: [dbo].sptblImportTransactionInsert
**		Desc: 
**
**		Return values:
** 
**		Called by:   
**              
**		Parameters:
**		Input							Output
**     ----------							-----------
**
**		Auth: CodeSmith
**		Date: 27/10/2011 17:41:37
*******************************************************************************
**		Change History
*******************************************************************************
**		Date:		Author:				Description:
**		--------		--------				-------------------------------------------
**    
*******************************************************************************/
CREATE PROCEDURE [dbo].sptblImportTransactionInsert
	@ValueDate datetime,
	@BuyCurrency varchar(3),
	@SellCurrency varchar(3),
	@CusRate decimal(10, 2),
	@BuyAmount decimal(24, 6),
	@SellAmount decimal(24, 6),
	@Branch varchar(3),
	@Rule1 int,
	@Rule2 int,
	@Rule3 int,
	@Rule4 int,
	@Rule5 int,
	@FromFileID uniqueidentifier,
	@CreatedBy varchar(7),
	@CustomerName varchar(128),
	@CreatedDate datetime,
	@ApprovedDate datetime,
	@ApprovedBy varchar(7),
	@Channel varchar(4),
	@BatchNo varchar(7),
	@CustMasterNo varchar(7),
	@CusSeg varchar(3),
	@Status int,
	@SlNo varchar(20),
	@CustCD varchar(9),
	@TranReferenceNo varchar(20),
	@Exception varchar(1024),
	@Command varchar(128),
	@ID uniqueidentifier output
AS

SET @ID = NEWID()

INSERT INTO [dbo].[tblImportTransaction] 
(
	[ID],
	[ValueDate],
	[BuyCurrency],
	[SellCurrency],
	[CusRate],
	[BuyAmount],
	[SellAmount],
	[Branch],
	[Rule1],
	[Rule2],
	[Rule3],
	[Rule4],
	[Rule5],
	[FromFileID],
	[CreatedBy],
	[CustomerName],
	[CreatedDate],
	[ApprovedDate],
	[ApprovedBy],
	[Channel],
	[BatchNo],
	[CustMasterNo],
	[CusSeg],
	[Status],
	[SlNo],
	[CustCD],
	[TranReferenceNo],
	[Exception],
	[Command]
) 
VALUES 
(
	@ID,
	@ValueDate,
	@BuyCurrency,
	@SellCurrency,
	@CusRate,
	@BuyAmount,
	@SellAmount,
	@Branch,
	@Rule1,
	@Rule2,
	@Rule3,
	@Rule4,
	@Rule5,
	@FromFileID,
	@CreatedBy,
	@CustomerName,
	@CreatedDate,
	@ApprovedDate,
	@ApprovedBy,
	@Channel,
	@BatchNo,
	@CustMasterNo,
	@CusSeg,
	@Status,
	@SlNo,
	@CustCD,
	@TranReferenceNo,
	@Exception,
	@Command
)

GO
	
